package com.moyi.manager.web.main;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.moyi.biz.dao.daoImpl.TblContextDAO;
import com.moyi.biz.dao.dataobject.TblContext;

public class HeadRequestAction extends Action {
	
	private static final String MAIN_MENU = "main_menu";

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		TblContextDAO dao = new TblContextDAO();
		List<TblContext> context = dao.findByGroup(MAIN_MENU);
		request.setAttribute("menu", context);
		return mapping.findForward("success");
	}

	
}
